/*    */ package com.zimbra.cs.account.callback;
/*    */ 
/*    */ import com.zimbra.common.localconfig.ConfigException;
/*    */ import com.zimbra.common.localconfig.KnownKey;
/*    */ import com.zimbra.common.localconfig.LC;
/*    */ import com.zimbra.common.localconfig.LocalConfig;
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.util.Log;
/*    */ import com.zimbra.common.util.ZimbraLog;
/*    */ import com.zimbra.cs.account.Entry;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.Server;
/*    */ import java.io.IOException;
/*    */ import org.dom4j.DocumentException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class MailPort
/*    */   extends CheckPortConflict
/*    */ {
/*    */   public void postModify(CallbackContext context, String attrName, Entry entry)
/*    */   {
/* 37 */     super.postModify(context, attrName, entry);
/* 38 */     if ((entry instanceof Server)) {
/* 39 */       Server localServer = null;
/*    */       try {
/* 41 */         localServer = Provisioning.getInstance().getLocalServer();
/* 42 */         if (entry == localServer) {
/* 43 */           String port = localServer.getAttr(attrName);
/* 44 */           LocalConfig lc = new LocalConfig(null);
/* 45 */           lc.set(LC.zimbra_mail_service_port.key(), port);
/* 46 */           lc.save();
/*    */         }
/*    */       } catch (ServiceException|DocumentException|ConfigException|NumberFormatException|IOException e) {
/* 49 */         ZimbraLog.misc.warn("Unable to update LC.zimbra_mail_port due to Exception", e);
/*    */       }
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/callback/MailPort.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */